<html><head>
   <title>The Unit Tests Window</title>
   <meta name="generator"  content="HelpMaker.net">
   <meta name="keywords"  content=""></head>
<body bgcolor="#FFFCEA">
<table width="100%"  border="0"  cellspacing="0"  cellpadding="2"  bgcolor="#C0C0C0">
  <tr>
    <td align="left">
      <div align="left"><font face="Arial"  color="#010101"  size="4"><span style=" font-size:14pt; font-family:Arial; color:#010101">The Unit Tests Window</span></font></div>

    </td>
    <td align="right">
      <font face="Arial"  size="2">
        <a href="todolistwindow.htm">Previous</a>&nbsp;<a href="pyscripter.htm">Top</a>&nbsp;<a href="callstackwindow.htm">Next</a>
      </font>
    </td>
  </tr></table>
<hr><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">This window provides an advanced GUI for running tests based on unittest, the standard Python 
module.</span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><br></span></font></div><div align="center"><img src="unittestswindow1.JPG" style="width:14.69em; height:31.63em"   border="0"  alt="graphic"></div><div align="center"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><br></span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><b><i><br></i></b></span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><b><i>Toolbar Commands:</i></b></span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><br></span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><i>Refresh</i></span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">Loads unit tests from the currently active module.&nbsp; Note that this involves importing the module 
into the integrated interpreter.&nbsp; After loading a module you can then select (check) the tests you 
want to run at the provided tree view. </span></font><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">Double clicking on a test or a test class name takes you to 
the source code where the test method or class are defined.</span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><br></span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><i>Clear</i></span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101">Clears all the tests and related information from this window.</span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><br></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i>Run</i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">Run the selected tests.&nbsp; After running the tests their status is indicated by the colour next to the 
test in the tree view.&nbsp; Green indicates success, Purple indicates assertion failure and Red 
indicates a Python exception (i.e. any other error).&nbsp; The pane below the tree view shows the 
overall statistics and you can view information about the errors that occurred by clicking on the 
tests that failed.&nbsp; </span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i><br></i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i>Stop tests</i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">If clicked while running the tests the testing process stops.</span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i><br></i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i>Select all</i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">Selects all available tests.</span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i><br></i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i>Deselect all</i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">Deselects all available tests.</span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i><br></i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i>Select failed tests</i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">After running a set of tests this command selects the tests that were not successful.</span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i><br></i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i>Expand all</i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">Expands all tree nodes</span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><br></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i>Collapse all</i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">Collapses all tree nodes</span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><br></span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><br></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><i>Note:</i></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">To use this GUI to run tests from multiple Python files (for example tests1.py, tests2.py and 
tests3.py) create a new script with the following content:</span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><br></span></font></div><div align="left"><font face="Courier New"  size="2"><span style=" font-size:10pt; font-family:Courier New; color:#000000">from tests1 import *</span></font></div><div align="left"><font face="Courier New"  size="2"><span style=" font-size:10pt; font-family:Courier New; color:#000000">from tests2 import *</span></font></div><div align="left"><font face="Courier New"  size="2"><span style=" font-size:10pt; font-family:Courier New; color:#000000">from tests3 import *</span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000"><br></span></font></div><div align="left"><font face="Arial"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#000000">Then use the Unit Tests GUI with that file.&nbsp; (Press the Refresh button while this file is active).</span></font></div><div align="left"><font face="Arial"  color="#010101"  size="2"><span style=" font-size:10pt; font-family:Arial; color:#010101"><br></span></font></div><div align="center">&nbsp;&nbsp;</div>

</body></html>
